<!-- 货架管理 -->
<template>
  <div class="shelves-box">
    <el-container>
      <el-header>
        <div class="select">
          <el-select v-model="value" placeholder="Select">
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value"
              :disabled="item.disabled"
            />
          </el-select>
        </div>
        <el-button type="primary">Primary</el-button>
        <el-button type="primary">Primary</el-button>
      </el-header>
      <el-main>
        <el-table :data="tableData" style="width: 100%" max-height="250">
          <el-table-column fixed prop="date" label="Date" width="150" />
          <el-table-column prop="name" label="Name" width="120" />
          <el-table-column prop="state" label="State" width="120" />
          <el-table-column prop="city" label="City" width="120" />
          <el-table-column prop="address" label="Address" width="600" />
          <el-table-column prop="zip" label="Zip" width="120" />
          <el-table-column fixed="right" label="Operations" width="120">
            <template #default="scope">
              <el-button
                link
                type="primary"
                size="small"
                @click.prevent="deleteRow(scope.$index)"
              >
                Remove
              </el-button>
            </template>
          </el-table-column>
        </el-table>
        <el-button class="mt-4" style="width: 100%" @click="onAddItem"
          >Add Item</el-button
        >
      </el-main>
    </el-container>
  </div>
</template>

<script setup>
import { ref, reactive } from "vue";
import { shopList } from "@/apis/shelves";

const value = ref("");
const id = ref("admin");
const state = reactive({
  analysis: [],
});
const loginEvt = async () => {
  const result = await shopList();

  console.log(result);
};
loginEvt();
</script>

<style lang="less" scoped>
.shelves-box {
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  position: relative;
  padding: 12px;
  background: cadetblue;
  .el-header {
    display: block;
    height: 49px;
    padding: 8px 12px;
    border-bottom: 1px solid #ddd;
    text-align: right;
    display: flex;
    justify-content: right;
    align-items: center;
    .select {
      margin-left: 10px;
      width: 220px;
      box-sizing: border-box;
      margin-right: 12px;
      padding: 0;
      color: rgba(0, 0, 0, 0.85);
      font-size: 14px;
      font-variant: tabular-nums;
      line-height: 1.5715;
      list-style: none;
      font-feature-settings: "tnum", "tnum";
      position: relative;
      display: inline-block;
      cursor: pointer;
      height: 100%;
      background: #ddd;
    }
    el-button {
      margin-left: 13px;
    }
  }
}
</style>
